function collect_same_elements(collection_a, object_b) {
  //在这里写入代码
  let arr1 = object_b.value;
  let arr2 = new Array();
  for(let i of collection_a){
    arr2.push(i.key);
  }
  return arr2.filter(function(i){
    return arr1.indexOf(i)!==-1;
  });
}

module.exports = collect_same_elements;
